<template>
	
	  <el-table :data="hisnews" style="width: 100%">
		<el-table-column prop="newsId" label="消息编号" width="80" />
	    <el-table-column prop="saveTime" label="保存时间" width="180" />
	    <el-table-column prop="historyNewsText" label="消息内容" />
	    <el-table-column prop="descirbe" label="消息描述" width= "180" />
	  </el-table>
	
</template>

<script>
	import qs from 'qs'
	
	export default{
		data(){
			return{
				rule:{},
				hisnews:[],
				user:{}
				
			}
		},
		methods:{
			
		},
		created(){
			const s=JSON.parse(sessionStorage.getItem("sessionnews"))
			let loginUser=JSON.parse(sessionStorage.getItem("user"))
			this.user=loginUser
			
			console.log(s.sessionId)
			this.rule.descirbe="/"+String(s.sessionId)+"/"
			this.rule.saveUserId=this.user.userId
			
			let that=this
			var str=qs.stringify(that.rule)
			that.$axios.get("http://localhost:8080/session/historyshow?"+str).then(function(res){
				that.hisnews=res.data
				console.log(that.hisnews)
			})
			
		}
		}
</script>

<style>
</style>
